<html xmlns="http://www.w3.org/1999/xhtml"><head><style type="text/css">
dt {
  font-style: italic;
  margin-top: 15px;
  margin-bottom: 3px;
  margin-left: 0px;
  border-bottom: 1px dotted black;
}
dd {
  margin-left: 10px;
}
table {
  border-collapse:collapse;
  border: 1px solid black;
  margin-top: 7px;
}
th {
  border: 1px solid black;
  padding: 3 7 3 7;
}
td {
  border: 1px solid black;
  padding: 3 7 3 7;
}
</style></head><body><p><a name="i2c"></a><b>i2c</b> :
  convert integer to character : <a href="opcodes.html">index</a> : <a href="http://asm.objectweb.org/asm40/javadoc/user/org/objectweb/asm/MethodVisitor.html#visitInsn(int)">visitInsn()</a></p><dl><dt>Description</dt><dd>Converts an integer to a 16-bit unsigned char.  A 32-bit int is popped
off the stack, the top 16 bits are set to zero and the resulting int value is
pushed back onto the stack. <br></br>i2c is used in Java when there is an explicit cast between an int and a char.
Notice that i2c produces an unsigned value - any sign bit for the original
number is lost. For example, in the code:<br></br><pre>
    int x = -1;
    char c = (char)x;
</pre>
The
value of c is positive 0xFFFF.</dd><dt>See also</dt><dd><a href="ref-i2b.html">i2b</a> <a href="ref-.html"></a> <a href="ref-i2s.html">i2s</a> </dd><dt>Stack</dt><dd><table xmlns="">
<tr>
<td>
<b>Before </b>
</td>
<td><b>After</b></td></tr>
<tr>
<td>value</td>
<td>result</td></tr>
<tr>
<td>...</td>
<td>...</td></tr>
</table></dd><dt>Bytecode</dt><dd><table xmlns="">
<tr>
<td>
<b> Type </b>
</td>
<td><b>Description</b></td></tr>
<tr>
<td>
u1 
</td>
<td>i2c
opcode = 0x92 (146)
</td></tr>
</table></dd></dl></body></html>